<?php

namespace app\api\listener;

use app\common\model\UserBusinessView;

class BusinessView
{
    public function handle($info)
    {
        $data = [
            'uid'         => $info['uid'],
            'business_id' => $info['business_id'],
            'create_date' => date("Y-m-d")
        ];
        if(!UserBusinessView::where($data)->find()){
            UserBusinessView::create($data);
        }
    }
}